package com.m2bshop.shop.service.impl;

import com.m2bshop.shop.dao.CompanyDao;
import com.m2bshop.shop.pojo.Company;
import com.m2bshop.shop.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CompanyServiceImpl implements CompanyService {

    @Resource
    private CompanyDao companyDao;

    @Override
    public List<Company> findComAll() {
        return companyDao.selectComAll();
    }

    @Override
    public Company findComByMvoId(String mvoId) {
        return companyDao.selectComByMvoId(mvoId);
    }

    @Override
    public void addCom(Company company) {
        companyDao.insertCom(company);
    }

    @Override
    public void updateCom(Company company) {
        System.out.println("update company service impl");
        companyDao.updateCom(company);
    }
}
